package com.service.impl;

import com.mapper.DeptMapper;
import com.pojo.TabDept;
import com.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    final DeptMapper deptMapper;

    @Autowired
    public DeptServiceImpl(DeptMapper deptMapper) {
        this.deptMapper = deptMapper;
    }

    @Override
    public List<TabDept> deptAll() {
        return deptMapper.deptAll();
    }

    @Override
    public TabDept deptById(Integer id) {
        return deptMapper.deptById(id);
    }

    @Override
    public Integer deptDeleteById(Integer id) {
        return deptMapper.deptDeleteById(id);
    }

    @Override
    public Integer deptDelete(Integer[] dept_id) {
        return deptMapper.deptDelete(dept_id);
    }

    @Override
    public Integer deptUpdate(TabDept dept) {
        return deptMapper.deptUpdate(dept);
    }

    @Override
    public Integer deptInsert(TabDept dept) {
        return deptMapper.deptInsert(dept);
    }
}
